import "crvpuppet"

define at3_etchosts($webaddr="", $roleid="", $extras="") {
  if $AutoMode==true and $CloudCRV==true {
  }

  if ( $AutoMode == false ) or ( $AutoMode==true and $CloudCRV==true ) {
    
    file { "/etc/hosts":
      owner => "root",
      group => "root",
      mode => 644,
      content => template("at3_etchosts/etc-hosts.tpl"),
    }
    
  }
  
  if $AutoMode==true and $CloudCRV==true {
    #publish some variables, e.g. InteractiveNodePublicAddress and let CloudCRV display it on the front.
    #set_role_attr($webaddr,$roleid,"ProfileApplied","True")
  }
}

define at3_etchosts_reverse($webaddr, $roleid) {
  #set_role_attr($webaddr,$roleid,"ReverseProfileApplied","True")
}

